--
-- PostgreSQL database dump
--

-- Started on 2009-11-12 19:30:42

SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;

--
-- TOC entry 1810 (class 1262 OID 40983)
-- Name: pewpew; Type: DATABASE; Schema: -; Owner: -
--

CREATE DATABASE pewpew WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'English_United States.1252' LC_CTYPE = 'English_United States.1252';


\connect pewpew

SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;

--
-- TOC entry 315 (class 2612 OID 16386)
-- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: -
--

CREATE PROCEDURAL LANGUAGE plpgsql;


SET search_path = public, pg_catalog;

SET default_tablespace = '';

SET default_with_oids = false;

--
-- TOC entry 1504 (class 1259 OID 49208)
-- Dependencies: 3
-- Name: bullet; Type: TABLE; Schema: public; Owner: -; Tablespace: 
--

CREATE TABLE bullet (
    bid bigint NOT NULL,
    pid bigint,
    x double precision,
    y double precision,
    rot double precision,
    timeshot time without time zone
);


--
-- TOC entry 1502 (class 1259 OID 40984)
-- Dependencies: 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 3
-- Name: chardata; Type: TABLE; Schema: public; Owner: -; Tablespace: 
--

CREATE TABLE chardata (
    pid integer NOT NULL,
    x double precision DEFAULT 0 NOT NULL,
    y double precision DEFAULT 0 NOT NULL,
    vx double precision DEFAULT 0 NOT NULL,
    vy double precision DEFAULT 0 NOT NULL,
    rot integer DEFAULT 0 NOT NULL,
    health integer DEFAULT 0 NOT NULL,
    maxhealth integer DEFAULT 0 NOT NULL,
    shield integer DEFAULT 0 NOT NULL,
    maxshield integer DEFAULT 0 NOT NULL,
    energy integer DEFAULT 0 NOT NULL,
    maxenergy integer DEFAULT 0 NOT NULL,
    lastupdate time without time zone,
    username text
);


--
-- TOC entry 1506 (class 1259 OID 49226)
-- Dependencies: 3
-- Name: chat; Type: TABLE; Schema: public; Owner: -; Tablespace: 
--

CREATE TABLE chat (
    mid integer,
    pid integer,
    msg_time time without time zone,
    message text
);


--
-- TOC entry 1505 (class 1259 OID 49224)
-- Dependencies: 3 1506
-- Name: chat_mid_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE chat_mid_seq
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


--
-- TOC entry 1813 (class 0 OID 0)
-- Dependencies: 1505
-- Name: chat_mid_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE chat_mid_seq OWNED BY chat.mid;


--
-- TOC entry 1507 (class 1259 OID 49283)
-- Dependencies: 3
-- Name: leaderboard; Type: TABLE; Schema: public; Owner: -; Tablespace: 
--

CREATE TABLE leaderboard (
    pid bigint,
    kills integer,
    deaths integer
);


--
-- TOC entry 1503 (class 1259 OID 41002)
-- Dependencies: 1796 1797 1798 1799 1800 1801 1802 1803 3
-- Name: online_player_controls; Type: TABLE; Schema: public; Owner: -; Tablespace: 
--

CREATE TABLE online_player_controls (
    pid integer NOT NULL,
    "MOVE_FORWARD" boolean DEFAULT false,
    "S_MOVE_FORWARD" boolean DEFAULT false,
    "MOVE_BACKWARD" boolean DEFAULT false,
    "S_MOVE_BACKWARD" boolean DEFAULT false,
    "ROTATE_LEFT" boolean DEFAULT false,
    "S_ROTATE_LEFT" boolean DEFAULT false,
    "ROTATE_RIGHT" boolean DEFAULT false,
    "S_ROTATE_RIGHT" boolean DEFAULT false
);


--
-- TOC entry 1805 (class 2606 OID 40988)
-- Dependencies: 1502 1502
-- Name: chardata_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
--

ALTER TABLE ONLY chardata
    ADD CONSTRAINT chardata_pkey PRIMARY KEY (pid);


--
-- TOC entry 1807 (class 2606 OID 41014)
-- Dependencies: 1503 1503
-- Name: online_player_controls_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
--

ALTER TABLE ONLY online_player_controls
    ADD CONSTRAINT online_player_controls_pkey PRIMARY KEY (pid);


--
-- TOC entry 1812 (class 0 OID 0)
-- Dependencies: 3
-- Name: public; Type: ACL; Schema: -; Owner: -
--

REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;


-- Completed on 2009-11-12 19:30:43

--
-- PostgreSQL database dump complete
--

